package kr.pe.osdev.dao.jdbc.mysql;

import java.util.List;

import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;

import kr.pe.osdev.dao.CoOwnerDao;
import kr.pe.osdev.dao.jdbc.BaseJdbcDao;
import kr.pe.osdev.domain.CoOwner;

@Repository
public class CoOwnerDaoImpl extends BaseJdbcDao implements CoOwnerDao {

    @Override
    public boolean add(CoOwner coOwner) throws DataAccessException {
        String sql = getMessageSourceAccessor().getMessage("coOwner.add");

        Object[] obj = new Object[] { coOwner.getSid(), coOwner.getQuestionSid(), coOwner.getUserSid() };

        int result = getJdbcTemplate().update(sql, obj);

        return (result > 0) ? true : false;
    }

    @Override
    public int count() throws DataAccessException {
        // TODO Auto-generated method stub
        return 0;
    }

    @Override
    public CoOwner find(CoOwner coOwner) throws DataAccessException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public List<CoOwner> findList() throws DataAccessException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public CoOwner modify(CoOwner coOwner) throws DataAccessException {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public CoOwner remove(CoOwner coOwner) throws DataAccessException {
        // TODO Auto-generated method stub
        return null;
    }

}
